Many data processing systems include at least one level of cache memory. A cache memory (or “cache” for short) contains a portion of the contents of the main memory for the data processing system. A cache is generally associated with one or several processors of the data processing system, is closer to these processors than main memory, and is faster than main memory. Because the cache contains a subset of the contents of the main memory, a particular access by a processor will reference data that may or may not be present in the cache. An access by a processor to data present in the cache can be completed faster than can an access to data not present in the cache, which must be completed by the slower and more distant main memory. Thus, the cache improves processor performance by reducing access time, and the cache allows main memory to support more processors by reducing the number of accesses to main memory.
A cache may be organized into cache lines that are at least as large as the largest access type by a processor. In many implementations, when a read access by a processor accesses data that is not in the cache and no other processor in the system has a copy of the data, the cache line containing the accessed data is transferred from main memory to the cache and the data is marked “valid and exclusive” in the cache. A subsequent write access by the processor that writes data to this cache line can write the data into the cache without accessing main memory, and the written data is marked “modified” in the cache. Because the cache has limited storage, the transferring of a cache line from main memory to the cache may require displacing another cache line. If the displaced cache line is not marked “modified” then the displaced cache line can simply be discarded. Otherwise the displaced cache line marked modified is transferred from the cache to main memory to update the contents of main memory.
Certain cache operations may be needed during power-up and power-down of a data processing system. On power-up of a data processing system, a cache may initially contain indeterminate values. An initialization procedure can be used to clear the contents of the cache during power-up of the data processing system, including marking each cache line as “invalid”. On power-down of a data processing system, any modified data in the cache must generally be preserved by a process that includes transferring the modified data to main memory.
A data processing system may have multiple processors that are organized into cells. Each cell may include one or more of the processors with each processor having an associated cache. The data processing system may allow independent power-up and power-down of each processor and cache within a cell. An example usage for independent power-up and power-down of a processor is to allow replacement of a processor that is determined to be defective. Generally, a maintenance processor of the data processing system controls the power-up and power-down of a processor and cache within a cell.
A data processing system may permit the cells to be partitioned into several virtual machines or “partitions.” Each virtual machine within the data processing system may operate under control of an independent instance of an operating system, and the maintenance processor may be responsible for setting up the virtual machines. An application executing on a virtual machine may have a temporarily increased work load, and the data processing system may allow the virtual machine to receive an additional cell reassigned by the maintenance processor from another virtual machine to augment the processing power assigned to the application. The reassignment of the cell between virtual machines may be accomplished by the power-down of the cell followed by a power-up of a cell in the desired virtual machine. However, the reassignment of a cell between virtual machines by power-down and power-up of the cell may be time-consuming and inefficient. What is needed, therefore, is an improved system and method for reassigning a cell between virtual machines.